<template>
  <div class="container">
    <TopCell text="精彩跟帖" />
    <mainComment
      v-for="commentData in commentList"
      :key="commentData.id"
      :commentData="commentData"
    />
  </div>
</template>

<script>
import { commentList } from "@/api/myComment";
import TopCell from "../components/TopCell";
import mainComment from "../components/comment/main";
export default {
  components: {
    TopCell,
    mainComment,
  },
  data() {
    return {
      commentList: [],
    };
  },
  created() {
    commentList(this.$route.params.id).then((res) => {
      console.log(res);
      this.commentList = res.data.data;
    });
  },
};
</script>
<style lang="less" scoped>
.container {
  padding: 0 10 /360 * 100vw;
}
</style>